Package-level declarations

Types

Link copied to clipboard
data class LifiAction(val fromChainId: String, val fromAmount: String, val fromToken: LifiToken, val toChainId: String, val toToken: LifiToken, val slippage: Double? = null, val fromAddress: String? = null, val toAddress: String? = null, val destinationGasConsumption: String? = null)

Action within a step

Link copied to clipboard
data class LifiBid(val user: String? = null, val router: String? = null, val initiator: String? = null, val sendingChainId: String? = null, val sendingAssetId: String? = null, val amount: String? = null, val receivingChainId: String? = null, val receivingAssetId: String? = null, val amountReceived: String? = null, val receivingAddress: String? = null, val transactionId: String? = null, val expiry: Int? = null, val callDataHash: String? = null, val callTo: String? = null, val encryptedCallData: String? = null, val sendingChainTxManagerAddress: String? = null, val receivingChainTxManagerAddress: String? = null, val bidExpiry: Int? = null)

Bid information

Link copied to clipboard

Error code

Link copied to clipboard

Error type

Link copied to clipboard
data class LifiEstimate(val tool: String, val fromAmount: String, val toAmount: String, val toAmountMin: String, val approvalAddress: String, val executionDuration: Double, val fromAmountUSD: String? = null, val toAmountUSD: String? = null, val feeCosts: List<LifiFeeCost>? = null, val gasCosts: List<LifiGasCost>? = null, val data: LifiEstimateData? = null)

Estimate for a step

Link copied to clipboard
data class LifiEstimateData(val bid: LifiBid? = null, val bidSignature: String? = null, val gasFeeInReceivingToken: String? = null, val totalFee: String? = null, val metaTxRelayerFee: String? = null, val routerFee: String? = null)

Estimate data (arbitrary data that depends on the tool)

Link copied to clipboard
data class LifiFailedRoute(val overallPath: String? = null, val subpaths: Map<String, LifiSubpathError>? = null)

Failed route

Link copied to clipboard
data class LifiFeeCost(val name: String, val percentage: String, val token: LifiToken, val amountUSD: String, val included: Boolean, val description: String? = null, val amount: String? = null, val feeSplit: LifiFeeSplit? = null)

Fee cost information

Link copied to clipboard
data class LifiFeeSplit(val integratorFee: String? = null, val lifiFee: String? = null)

Fee split between integrator and LI.FI

Link copied to clipboard
data class LifiFilteredRoute(val overallPath: String? = null, val reason: String? = null)

Filtered out route

Link copied to clipboard
data class LifiGasCost(val type: LifiGasCostType, val amount: String, val token: LifiToken, val price: String? = null, val estimate: String? = null, val limit: String? = null, val amountUSD: String? = null)

Gas cost information

Link copied to clipboard

Type of gas cost

Link copied to clipboard
data class LifiIncludedSwapStep(val tool: String? = null, val toolDetails: LifiToolDetails? = null, val fromAmount: String? = null, val fromToken: LifiToken? = null, val toAmount: String? = null, val toToken: LifiToken? = null, val bridgedAmount: String? = null)

Included swap or protocol step in the status response

Link copied to clipboard
data class LifiInternalStep(val id: String, val type: LifiStepType, val tool: String, val toolDetails: LifiToolDetails, val action: LifiAction, val estimate: LifiEstimate)

Internal step (used in includedSteps)

Link copied to clipboard
data class LifiMetadata(val integrator: String? = null)

Transaction metadata

Link copied to clipboard
data class LifiQuoteData(val rawResponse: LifiStep)
Link copied to clipboard
data class LifiQuoteErrorResponse(val message: String, val errors: LifiUnavailableRoutes? = null)

Error response when unable to find a quote for the requested transfer (404)

Link copied to clipboard

The way the resulting quote should be ordered

Link copied to clipboard
data class LifiQuoteRequest(val fromChain: String, val toChain: String, val fromToken: String, val toToken: String, val fromAddress: String, val fromAmount: String, val toAddress: String? = null, val order: LifiQuoteOrder? = null, val slippage: Double? = null, val integrator: String? = null, val fee: Double? = null, val referrer: String? = null, val allowBridges: List<String>? = null, val allowExchanges: List<String>? = null, val denyBridges: List<String>? = null, val denyExchanges: List<String>? = null, val preferBridges: List<String>? = null, val preferExchanges: List<String>? = null, val allowDestinationCall: Boolean? = null, val fromAmountForGas: String? = null, val maxPriceImpact: Double? = null, val swapStepTimingStrategies: List<String>? = null, val routeTimingStrategies: List<String>? = null, val skipSimulation: Boolean? = null)

Used to request a quote for a transfer of one token to another, cross chain or not

Link copied to clipboard
data class LifiQuoteResponse(val data: LifiQuoteData? = null, val error: String? = null)

Response containing a quote from the Lifi integration

Link copied to clipboard
data class LifiReceivingInfo(val chainId: String? = null, val txHash: String? = null, val txLink: String? = null, val token: LifiToken? = null, val amount: String? = null, val gasToken: LifiToken? = null, val gasAmount: String? = null, val gasAmountUSD: String? = null, val gasPrice: String? = null, val gasUsed: String? = null, val timestamp: Int? = null, val value: String? = null, val includedSteps: List<LifiIncludedSwapStep>? = null)

Receiving chain information (can be partial or full transaction info)

Link copied to clipboard
data class LifiRoute(val id: String, val fromChainId: String, val fromAmountUSD: String, val fromAmount: String, val fromToken: LifiToken, val toChainId: String, val toAmountUSD: String, val toAmount: String, val toAmountMin: String, val toToken: LifiToken, val steps: List<LifiStep>, val gasCostUSD: String? = null, val fromAddress: String? = null, val toAddress: String? = null, val containsSwitchChain: Boolean? = null, val tags: List<String>? = null)

A route that can be used to realize a token transfer

Link copied to clipboard
data class LifiRoutesData(val rawResponse: LifiRoutesRawResponse)
Link copied to clipboard

The way the resulting routes should be ordered

Link copied to clipboard
data class LifiRoutesRawResponse(val routes: List<LifiRoute>, val unavailableRoutes: LifiUnavailableRoutes? = null)
Link copied to clipboard
data class LifiRoutesRequest(val fromChainId: String, val fromAmount: String, val fromTokenAddress: String, val toChainId: String, val toTokenAddress: String, val options: LifiRoutesRequestOptions? = null, val fromAddress: String? = null, val toAddress: String? = null, val fromAmountForGas: String? = null)

Describes a desired any-to-any transfer and contains all information necessary to calculate the most efficient routes

Link copied to clipboard
data class LifiRoutesRequestOptions(val insurance: Boolean? = null, val integrator: String? = null, val slippage: Double? = null, val bridges: LifiToolsConfiguration? = null, val exchanges: LifiToolsConfiguration? = null, val order: LifiRoutesOrder? = null, val allowSwitchChain: Boolean? = null, val allowDestinationCall: Boolean? = null, val referrer: String? = null, val fee: Double? = null, val maxPriceImpact: Double? = null, val timing: LifiTimingOptions? = null)

Optional configuration for the routes

Link copied to clipboard
data class LifiRoutesResponse(val data: LifiRoutesData? = null, val error: String? = null)

Response containing routes from the Lifi integration

Link copied to clipboard

Bridging tools supported for status check

Link copied to clipboard
data class LifiStatusData(val rawResponse: LifiStatusRawResponse)
Link copied to clipboard
data class LifiStatusRawResponse(val sending: LifiTransactionInfo, val receiving: LifiReceivingInfo? = null, val feeCosts: List<LifiFeeCost>? = null, val status: LifiTransferStatus, val substatus: LifiTransferSubstatus? = null, val substatusMessage: String? = null, val tool: String, val transactionId: String? = null, val fromAddress: String? = null, val toAddress: String? = null, val lifiExplorerLink: String? = null, val bridgeExplorerLink: String? = null, val metadata: LifiMetadata? = null)

Contains the current status of a cross chain transfer

Link copied to clipboard
data class LifiStatusRequest(val txHash: String, val bridge: LifiStatusBridge? = null, val fromChain: String? = null, val toChain: String? = null)

Used to check the status of a cross chain transfer

Link copied to clipboard
data class LifiStatusResponse(val data: LifiStatusData? = null, val error: String? = null)

Response containing the status of a cross chain transfer from the Lifi integration

Link copied to clipboard
data class LifiStep(val id: String, val type: LifiStepType, val tool: String, val action: LifiAction, val toolDetails: LifiToolDetails? = null, val estimate: LifiEstimate? = null, val includedSteps: List<LifiInternalStep>? = null, val integrator: String? = null, val referrer: String? = null, val execution: JsonElement? = null, val transactionRequest: JsonElement? = null, val transactionId: String? = null, val gasCostUSD: String? = null, val fromAddress: String? = null, val toAddress: String? = null, val containsSwitchChain: Boolean? = null)

Step in a route

Link copied to clipboard
data class LifiStepTransactionData(val rawResponse: LifiStep)
Link copied to clipboard

Request for step transaction - type alias for LifiStep

Link copied to clipboard
data class LifiStepTransactionResponse(val data: LifiStepTransactionData? = null, val error: String? = null)

Response containing a step with transaction data from the Lifi integration

Link copied to clipboard

Type of step in a route

Link copied to clipboard
data class LifiSubpathError(val errorType: LifiErrorType? = null, val code: LifiErrorCode? = null, val action: LifiAction? = null, val tool: String? = null, val message: String? = null)

Subpath error information

Link copied to clipboard
data class LifiTimingOptions(val swapStepTimingStrategies: List<LifiTimingStrategy>? = null, val routeTimingStrategies: List<LifiTimingStrategy>? = null)

Timing options for routes and swap steps

Link copied to clipboard
data class LifiTimingStrategy(val strategy: LifiTimingStrategyType? = null, val minWaitTimeMs: Int? = null, val startingExpectedResults: Int? = null, val reduceEveryMs: Int? = null)

Timing strategy configuration

Link copied to clipboard

Type of timing strategy

Link copied to clipboard
data class LifiToken(val address: String, val symbol: String, val decimals: Int, val chainId: String, val name: String, val coinKey: String? = null, val logoURI: String? = null, val priceUSD: String? = null)

Token information

Link copied to clipboard
data class LifiToolDetails(val key: String? = null, val name: String? = null, val logoURI: String? = null, val webUrl: String? = null)

Tool details

Link copied to clipboard
data class LifiToolsConfiguration(val allow: List<String>? = null, val deny: List<String>? = null, val prefer: List<String>? = null)

Configuration for bridges or exchanges (allow, deny, prefer)

Link copied to clipboard
data class LifiTransactionInfo(val txHash: String, val txLink: String, val amount: String, val amountUSD: String? = null, val token: LifiToken, val chainId: String, val gasToken: LifiToken? = null, val gasAmount: String? = null, val gasAmountUSD: String? = null, val gasPrice: String? = null, val gasUsed: String? = null, val timestamp: Int? = null, val value: String? = null, val includedSteps: List<LifiIncludedSwapStep>? = null)

Transaction information

Link copied to clipboard

The current status of the transfer

Link copied to clipboard

A more specific substatus for PENDING and DONE statuses

Link copied to clipboard
data class LifiUnavailableRoutes(val filteredOut: List<LifiFilteredRoute>? = null, val failed: List<LifiFailedRoute>? = null)

Unavailable routes information